package com.zerui.manager.app.operationrecord.executer;

import com.alibaba.cola.catchlog.CatchAndLog;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zerui.manager.app.operationrecord.convertor.OperationRecordVoConvert;
import com.zerui.manager.operationrecord.OperationRecord;
import com.zerui.manager.operationrecord.domainservice.OperationRecordRepository;
import com.zerui.manager.web.cmd.OperationRecordCmd;
import com.zerui.manager.web.vo.OperationRecordVO;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * @Author wh
 * @create_time 2023-08-23 16:29
 */
@Component
@CatchAndLog
public class OperationRecordQryCmdExe {

    @Resource
    private OperationRecordRepository operationRecordRepository;
	public Page<OperationRecordVO> execute(OperationRecordCmd operationRecordCmd) {
		Page<OperationRecord> pageResponse = operationRecordRepository.getPageList(operationRecordCmd);
		return OperationRecordVoConvert.INSTANCE.covertOperationRecordToPageVO(pageResponse);
	}
}
